package com.ruoyi.mdm.mapper;

import java.util.List;

import com.ruoyi.mdm.domain.SkuMaster;
import com.ruoyi.mdm.domain.SkuPriceEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * sku主档Mapper接口
 *
 * @author shiseido
 * @date 2025-03-01
 */
@Repository
public interface SkuMasterMapper {
    /**
     * 查询sku主档
     *
     * @param id sku主档主键
     * @return sku主档
     */
    public SkuMaster selectSkuMasterById(Long id);

    /**
     * 查询sku主档
     *
     * @param skumCode skum编码
     * @return sku主档
     */
    public List<SkuMaster> selectSkuMasterBySkumCode(String skumCode);

    /**
     * 查询sku主档
     *
     * @param spuCode spu编码
     * @return sku主档
     */
    public List<SkuMaster> selectSkuMasterBySpuCode(String spuCode);

    /**
     * 查询sku主档
     *
     * @param ownerId   品牌代码
     * @param goodsCode sku编码
     * @return sku主档
     */
    public SkuMaster selectSkuMasterByGoodsCode(@Param("ownerId") String ownerId,
                                                @Param("goodsCode")String goodsCode);


    public SkuMaster selectSkuMasterLogByGoodsCode(@Param("ownerId") String ownerId,
                                                @Param("goodsCode")String goodsCode);

    /**
     * 查询skuToES 产品列表
     *
     * @param skuMaster sku主档
     * @return sku主档集合
     */
    public List<SkuMaster> selectSkuMasterToEs(SkuMaster skuMaster);

    /**
     * 查询sku主档列表
     *
     * @param skuMaster sku主档
     * @return sku主档集合
     */
    public List<SkuMaster> selectSkuMasterList(SkuMaster skuMaster);


    /**
     * 查询sku主档列表
     *
     * @return sku主档集合
     */
    public List<SkuMaster> salePriceDiff();

    /**
     * 新增sku主档
     *
     * @param skuMaster sku主档
     * @return 结果
     */
    public int insertSkuMaster(SkuMaster skuMaster);

    /**
     * 修改sku主档
     *
     * @param skuMaster sku主档
     * @return 结果
     */
    public int updateSkuMaster(SkuMaster skuMaster);

    /**
     * 删除sku主档
     *
     * @param id sku主档主键
     * @return 结果
     */
    public int deleteSkuMasterById(Long id);

    /**
     * 批量删除sku主档
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSkuMasterByIds(Long[] ids);


    public List<SkuPriceEntity> skuPriceCompare();


}
